<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
                      "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
    <title>The Grails Framework 3.2.11</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <link rel="stylesheet" href="../../css/main.css" type="text/css" media="screen, print" title="Style" charset="utf-8"/>
    <link rel="stylesheet" href="../../css/pdf.css" type="text/css" media="print" title="PDF" charset="utf-8"/>
    <script type="text/javascript">
function addJsClass(el) {
    var classes = document.body.className.split(" ");
    classes.push("js");
    document.body.className = classes.join(" ");
}
    </script>
    <style>
        .contribute-btn {
            bottom: 0px;
        }
    </style>
</head>

<body class="body" onload="addJsClass();">

<div id="navigation">
    <div class="navTitle">
        
        The Grails Framework
    </div>

    <div class="navLinks">
        <ul>
            <li>
                <div id="nav-summary" onmouseover="toggleNavSummary(false)" onmouseout="toggleNavSummary(true)">
                    <a href="../../guide/index.html" class="button">Table of contents</a>

                    <div id="nav-summary-childs">
                        
                        <div class="toc-item" style="margin-left:0"><a href="../../guide/introduction.html"><strong>1</strong><span>Introduction</span></a>
                        </div>
                        
                        <div class="toc-item" style="margin-left:0"><a href="../../guide/gettingStarted.html"><strong>2</strong><span>Getting Started</span></a>
                        </div>
                        
                        <div class="toc-item" style="margin-left:0"><a href="../../guide/upgrading.html"><strong>3</strong><span>Upgrading</span></a>
                        </div>
                        
                        <div class="toc-item" style="margin-left:0"><a href="../../guide/conf.html"><strong>4</strong><span>Configuration</span></a>
                        </div>
                        
                        <div class="toc-item" style="margin-left:0"><a href="../../guide/commandLine.html"><strong>5</strong><span>The Command Line</span></a>
                        </div>
                        
                        <div class="toc-item" style="margin-left:0"><a href="../../guide/profiles.html"><strong>6</strong><span>Application Profiles</span></a>
                        </div>
                        
                        <div class="toc-item" style="margin-left:0"><a href="../../guide/GORM.html"><strong>7</strong><span>Object Relational Mapping (GORM)</span></a>
                        </div>
                        
                        <div class="toc-item" style="margin-left:0"><a href="../../guide/theWebLayer.html"><strong>8</strong><span>The Web Layer</span></a>
                        </div>
                        
                        <div class="toc-item" style="margin-left:0"><a href="../../guide/traits.html"><strong>9</strong><span>Traits</span></a>
                        </div>
                        
                        <div class="toc-item" style="margin-left:0"><a href="../../guide/webServices.html"><strong>10</strong><span>Web Services</span></a>
                        </div>
                        
                        <div class="toc-item" style="margin-left:0"><a href="../../guide/async.html"><strong>11</strong><span>Asynchronous Programming</span></a>
                        </div>
                        
                        <div class="toc-item" style="margin-left:0"><a href="../../guide/validation.html"><strong>12</strong><span>Validation</span></a>
                        </div>
                        
                        <div class="toc-item" style="margin-left:0"><a href="../../guide/services.html"><strong>13</strong><span>The Service Layer</span></a>
                        </div>
                        
                        <div class="toc-item" style="margin-left:0"><a href="../../guide/staticTypeCheckingAndCompilation.html"><strong>14</strong><span>Static Type Checking And Compilation</span></a>
                        </div>
                        
                        <div class="toc-item" style="margin-left:0"><a href="../../guide/testing.html"><strong>15</strong><span>Testing</span></a>
                        </div>
                        
                        <div class="toc-item" style="margin-left:0"><a href="../../guide/i18n.html"><strong>16</strong><span>Internationalization</span></a>
                        </div>
                        
                        <div class="toc-item" style="margin-left:0"><a href="../../guide/security.html"><strong>17</strong><span>Security</span></a>
                        </div>
                        
                        <div class="toc-item" style="margin-left:0"><a href="../../guide/plugins.html"><strong>18</strong><span>Plugins</span></a>
                        </div>
                        
                        <div class="toc-item" style="margin-left:0"><a href="../../guide/spring.html"><strong>19</strong><span>Grails and Spring</span></a>
                        </div>
                        
                        <div class="toc-item" style="margin-left:0"><a href="../../guide/hibernate.html"><strong>20</strong><span>Grails and Hibernate</span></a>
                        </div>
                        
                        <div class="toc-item" style="margin-left:0"><a href="../../guide/scaffolding.html"><strong>21</strong><span>Scaffolding</span></a>
                        </div>
                        
                        <div class="toc-item" style="margin-left:0"><a href="../../guide/deployment.html"><strong>22</strong><span>Deployment</span></a>
                        </div>
                        
                        <div class="toc-item" style="margin-left:0"><a href="../../guide/contributing.html"><strong>23</strong><span>Contributing to Grails</span></a>
                        </div>
                        
                    </div>
                </div>
            </li>
            <li class="separator selected">
                <a id="ref-button" onclick="localToggle(); return false;" href="#">Quick Reference</a>
            </li>
        </ul>
    </div>
</div>


<table id="colset" border="0" cellpadding="0" cellspacing="0">
    <tr>
        <td id="col1">
            <div id="main" class="reference corner-all">

                <span id='toggle-col1' class="toggle">(<a href="#" onclick="localToggle(); return false;">Quick Reference</a>)</span>
                
                <div class='contribute-btn'>
                    <button type='button' class='btn btn-default' onclick='window.location.href="https://github.com/grails/grails-doc/edit/3.2.x/src/en/ref/Domain Classes/createCriteria.adoc"'>
                        <i class='fa fa-pencil-square-o'></i> Improve this doc
                    </button>
                </div>
                

                <div class="sect1">
<h2 id="_createcriteria">createCriteria</h2>
<div class="sectionbody">
<div class="sect2">
<h3 id="_purpose">Purpose</h3>
<div class="paragraph">
<p>Creates and returns an instance of Grails' <a href="http://grails.github.io/grails-data-mapping/latest/api/grails/orm/HibernateCriteriaBuilder.html">HibernateCriteriaBuilder</a> that can be used to construct criteria queries.</p>
</div>
<div class="admonitionblock warning">
<table>
<tr>
<td class="icon">
<i class="fa icon-warning" title="Warning"></i>
</td>
<td class="content">
Unit tests use an in-memory implementation of GORM without Hibernate, and as such, <code>createCriteria()</code> returns an instance of <a href="http://grails.github.io/grails-data-mapping/latest/api/grails/gorm/CriteriaBuilder.html">CriteriaBuilder</a>, not HibernateCriteriaBuilder.
</td>
</tr>
</table>
</div>
</div>
<div class="sect2">
<h3 id="_examples">Examples</h3>
<div class="paragraph">
<p>The criterion methods (like, and, or, between etc) used to build the criteria can be statically imported from HibernateCriteriaBuilder (as in the following examples in this document), or written as "c.like(&#8230;&#8203;)", "c.between(&#8230;&#8203;)" etc.</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="CodeRay highlight"><code data-lang="groovy"><span class="keyword">def</span> c = Account.createCriteria()
<span class="keyword">def</span> results = c.list {
    like(<span class="string"><span class="delimiter">&quot;</span><span class="content">holderFirstName</span><span class="delimiter">&quot;</span></span>, <span class="string"><span class="delimiter">&quot;</span><span class="content">Fred%</span><span class="delimiter">&quot;</span></span>)
    and {
        between(<span class="string"><span class="delimiter">&quot;</span><span class="content">balance</span><span class="delimiter">&quot;</span></span>, <span class="integer">500</span>, <span class="integer">1000</span>)
        eq(<span class="string"><span class="delimiter">&quot;</span><span class="content">branch</span><span class="delimiter">&quot;</span></span>, <span class="string"><span class="delimiter">&quot;</span><span class="content">London</span><span class="delimiter">&quot;</span></span>)
    }
    maxResults(<span class="integer">10</span>)
    order(<span class="string"><span class="delimiter">&quot;</span><span class="content">holderLastName</span><span class="delimiter">&quot;</span></span>, <span class="string"><span class="delimiter">&quot;</span><span class="content">desc</span><span class="delimiter">&quot;</span></span>)
}</code></pre>
</div>
</div>
<div class="paragraph">
<p>To use pagination you would have to make another query to retrieve the total number of matching results. A better way is to pass the pagination values as arguments to the criteria method as shown below:</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="CodeRay highlight"><code data-lang="groovy"><span class="keyword">def</span> c = Account.createCriteria()
<span class="keyword">def</span> results = c.list (<span class="key">max</span>: <span class="integer">10</span>, <span class="key">offset</span>: <span class="integer">10</span>) {
    like(<span class="string"><span class="delimiter">&quot;</span><span class="content">holderFirstName</span><span class="delimiter">&quot;</span></span>, <span class="string"><span class="delimiter">&quot;</span><span class="content">Fred%</span><span class="delimiter">&quot;</span></span>)
    and {
        between(<span class="string"><span class="delimiter">&quot;</span><span class="content">balance</span><span class="delimiter">&quot;</span></span>, <span class="integer">500</span>, <span class="integer">1000</span>)
        eq(<span class="string"><span class="delimiter">&quot;</span><span class="content">branch</span><span class="delimiter">&quot;</span></span>, <span class="string"><span class="delimiter">&quot;</span><span class="content">London</span><span class="delimiter">&quot;</span></span>)
    }
    order(<span class="string"><span class="delimiter">&quot;</span><span class="content">holderLastName</span><span class="delimiter">&quot;</span></span>, <span class="string"><span class="delimiter">&quot;</span><span class="content">desc</span><span class="delimiter">&quot;</span></span>)
}</code></pre>
</div>
</div>
<div class="paragraph">
<p>Because that query includes pagination parameters (max and offset), this will return a <a href="http://grails.github.io/grails-data-mapping/latest/api/grails/orm/PagedResultList.html">PagedResultList</a> which has a <code>getTotalCount()</code> method to return the total number of matching records for pagination. Two queries are still run, but they are run for you and the results and total count are combined in the <code>PagedResultList</code>.</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="CodeRay highlight"><code data-lang="groovy">println <span class="string"><span class="delimiter">&quot;</span><span class="content">Rendering </span><span class="inline"><span class="inline-delimiter">${</span>results.size()<span class="inline-delimiter">}</span></span><span class="content"> Accounts of </span><span class="inline"><span class="inline-delimiter">${</span>results.totalCount<span class="inline-delimiter">}</span></span><span class="delimiter">&quot;</span></span></code></pre>
</div>
</div>
</div>
<div class="sect2">
<h3 id="_description">Description</h3>
<div class="paragraph">
<p>Criteria queries are a type-safe, advanced way to query that uses a Groovy builder to construct potentially complex queries. It is a much better alternative to using a StringBuilder to dynamically construct an HQL query. Refer to the user guide section on <a href="http://gorm.grails.org/6.0.x/hibernate/manual/index.html#criteria">Criteria</a> for usage instructions.</p>
</div>
<div class="paragraph">
<p>Method reference:</p>
</div>
<table class="tableblock frame-all grid-all spread">
<colgroup>
<col style="width: 50%;">
<col style="width: 50%;">
</colgroup>
<thead>
<tr>
<th class="tableblock halign-left valign-top">Method</th>
<th class="tableblock halign-left valign-top">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>list</strong></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">The default method; returns all matching rows.</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>get</strong></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Returns a unique result, i.e. just one row. The criteria has to be formed that way, that it only queries one row. This method is not to be confused with a limit to just the first row.</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>scroll</strong></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Returns a scrollable result set</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>listDistinct</strong></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">If subqueries or associations are used, one may end up with the same row multiple times in the result set. In Hibernate one would do a "CriteriaSpecification.DISTINCT_ROOT_ENTITY". In Grails one can do it by just using this method.</p></td>
</tr>
</tbody>
</table>
<div class="admonitionblock warning">
<table>
<tr>
<td class="icon">
<i class="fa icon-warning" title="Warning"></i>
</td>
<td class="content">
The <code>listDistinct()</code> method does not work well with the pagination options <code>maxResult</code> and <code>firstResult</code>. If you need distinct results with pagination, we currently recommend that you use HQL. You can find out more information from <a href="http://floledermann.blogspot.com/2007/10/solving-hibernate-criterias-distinct.html">this blog post</a>.
</td>
</tr>
</table>
</div>
<div class="paragraph">
<p>If you invoke the builder with no method name</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="CodeRay highlight"><code data-lang="groovy">c { ... }</code></pre>
</div>
</div>
<div class="paragraph">
<p>the <code>list()</code> method will be invoked automatically. In other words, it&#8217;s the equivalent of</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="CodeRay highlight"><code data-lang="groovy">c.list { ... }</code></pre>
</div>
</div>
<div class="paragraph">
<p>Below is a node reference for each criterion method:</p>
</div>
<table class="tableblock frame-all grid-all spread">
<colgroup>
<col style="width: 33.3333%;">
<col style="width: 33.3333%;">
<col style="width: 33.3334%;">
</colgroup>
<thead>
<tr>
<th class="tableblock halign-left valign-top">Node</th>
<th class="tableblock halign-left valign-top">Description</th>
<th class="tableblock halign-left valign-top">Example</th>
</tr>
</thead>
<tbody>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>between</strong></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Where the property value is between two distinct values</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock"><code>between("balance", 500, 1000)</code></p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>eq</strong></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Where a property equals a particular value.</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock"><code>eq("branch", "London")</code></p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>eq</strong> (case-insensitive)</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">A version of <strong>eq</strong> that supports an optional 3rd Map parameter to specify that the query be case-insensitive.</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock"><code>eq("branch", "london", [ignoreCase: true])</code></p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>eqProperty</strong></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Where one property must equal another</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock"><code>eqProperty("lastTx", "firstTx")</code></p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>gt</strong></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Where a property is greater than a particular value</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock"><code>gt("balance",1000)</code></p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>gtProperty</strong></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Where one property must be greater than another</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock"><code>gtProperty("balance", "overdraft")</code></p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>ge</strong></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Where a property is greater than or equal to a particular value</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock"><code>ge("balance", 1000)</code></p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>geProperty</strong></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Where one property must be greater than or equal to another</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock"><code>geProperty("balance", "overdraft")</code></p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>idEq</strong></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Where an objects id equals the specified value</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock"><code>idEq(1)</code></p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>ilike</strong></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">A case-insensitive 'like' expression</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock"><code>ilike("holderFirstName", "Steph%")</code></p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>in</strong></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Where a property is contained within the specified list of values. Can also be chained with the <code>not</code> method where a property is not contained within the specified list of values. Note: 'in' is a Groovy reserve word, so it must be escaped by quotes.</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock"><code>'in'("age",[18..65]) or not {'in'("age",[18..65])}</code></p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>isEmpty</strong></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Where a collection property is empty</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock"><code>isEmpty("transactions")</code></p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>isNotEmpty</strong></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Where a collection property is not empty</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock"><code>isNotEmpty("transactions")</code></p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>isNull</strong></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Where a property is <code>null</code></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock"><code>isNull("holderGender")</code></p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>isNotNull</strong></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Where a property is not <code>null</code></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock"><code>isNotNull("holderGender")</code></p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>lt</strong></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Where a property is less than a particular value</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock"><code>lt("balance", 1000)</code></p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>ltProperty</strong></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Where one property must be less than another</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock"><code>ltProperty("balance", "overdraft")</code></p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>le</strong></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Where a property is less than or equal to a particular value</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock"><code>le("balance", 1000)</code></p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>leProperty</strong></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Where one property must be less than or equal to another</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock"><code>leProperty("balance", "overdraft")</code></p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>like</strong></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Equivalent to SQL like expression</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock"><code>like("holderFirstName", "Steph%")</code></p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>ne</strong></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Where a property does not equal a particular value</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock"><code>ne("branch", "London")</code></p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>neProperty</strong></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Where one property does not equal another</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock"><code>neProperty("lastTx", "firstTx")</code></p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>order</strong></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Order the results by a particular property</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock"><code>order("holderLastName", "desc")</code></p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>rlike</strong></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Similar to like, but uses a regex. Only supported on Oracle and MySQL.</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock"><code>rlike("holderFirstName", /Steph.+/)</code></p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>sizeEq</strong></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Where a collection property&#8217;s size equals a particular value</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock"><code>sizeEq("transactions", 10)</code></p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>sizeGt</strong></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Where a collection property&#8217;s size is greater than a particular value</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock"><code>sizeGt("transactions", 10)</code></p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>sizeGe</strong></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Where a collection property&#8217;s size is greater than or equal to a particular value</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock"><code>sizeGe("transactions", 10)</code></p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>sizeLt</strong></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Where a collection property&#8217;s size is less than a particular value</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock"><code>sizeLt("transactions", 10)</code></p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>sizeLe</strong></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Where a collection property&#8217;s size is less than or equal to a particular value</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock"><code>sizeLe("transactions", 10)</code></p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>sizeNe</strong></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Where a collection property&#8217;s size is not equal to a particular value</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock"><code>sizeNe("transactions", 10)</code></p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>sqlRestriction</strong></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Use arbitrary SQL to modify the resultset</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock"><code>sqlRestriction "char_length(first_name) = 4"</code></p></td>
</tr>
</tbody>
</table>
<div class="paragraph">
<p>With dynamic finders, you have access to options such as <code>max</code>, <code>sort</code>, etc. These are available to criteria queries as well, but they have different names:</p>
</div>
<table class="tableblock frame-all grid-all spread">
<colgroup>
<col style="width: 33.3333%;">
<col style="width: 33.3333%;">
<col style="width: 33.3334%;">
</colgroup>
<thead>
<tr>
<th class="tableblock halign-left valign-top">Name</th>
<th class="tableblock halign-left valign-top">Description</th>
<th class="tableblock halign-left valign-top">Example</th>
</tr>
</thead>
<tbody>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>order</strong>(String, String)</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Specifies both the sort column (the first argument) and the sort order (either 'asc' or 'desc').</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock"><code>order "age", "desc"</code></p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>firstResult</strong>(int)</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Specifies the offset for the results. A value of 0 will return all records up to the maximum specified.</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock"><code>firstResult 20</code></p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>maxResults</strong>(int)</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Specifies the maximum number of records to return.</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock"><code>maxResults 10</code></p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>cache</strong>(boolean)</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Indicates if the query should be cached (if the query cache is enabled).</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock"><code>cache 'true'</code></p></td>
</tr>
</tbody>
</table>
<div class="paragraph">
<p>Criteria also support the notion of projections. A projection is used to change the nature of the results. For example the following query uses a projection to count the number of distinct <code>branch</code> names that exist for each <code>Account</code>:</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="CodeRay highlight"><code data-lang="groovy"><span class="keyword">def</span> c = Account.createCriteria()
<span class="keyword">def</span> branchCount = c.get {
    projections {
        countDistinct <span class="string"><span class="delimiter">&quot;</span><span class="content">branch</span><span class="delimiter">&quot;</span></span>
    }
}</code></pre>
</div>
</div>
<div class="paragraph">
<p>The following table summarizes the different projections and what they do:</p>
</div>
<table class="tableblock frame-all grid-all spread">
<colgroup>
<col style="width: 33.3333%;">
<col style="width: 33.3333%;">
<col style="width: 33.3334%;">
</colgroup>
<thead>
<tr>
<th class="tableblock halign-left valign-top">Name</th>
<th class="tableblock halign-left valign-top">Description</th>
<th class="tableblock halign-left valign-top">Example</th>
</tr>
</thead>
<tbody>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>property</strong></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Returns the given property in the returned results</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock"><code>property("firstName")</code></p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>distinct</strong></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Returns results using a single or collection of distinct property names</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock"><code>distinct("fn") or distinct(['fn', 'ln'])</code></p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>avg</strong></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Returns the average value of the given property</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock"><code>avg("age")</code></p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>count</strong></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Returns the count of the given property name</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock"><code>count("branch")</code></p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>countDistinct</strong></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Returns the count of the given property name for distinct rows</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock"><code>countDistinct("branch")</code></p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>groupProperty</strong></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Groups the results by the given property</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock"><code>groupProperty("lastName")</code></p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>max</strong></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Returns the maximum value of the given property</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock"><code>max("age")</code></p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>min</strong></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Returns the minimum value of the given property</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock"><code>min("age")</code></p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>sum</strong></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Returns the sum of the given property</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock"><code>sum("balance")</code></p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>rowCount</strong></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Returns count of the number of rows returned</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock"><code>rowCount()</code></p></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
            </div>
        </td>
        <td id="col2">
            <div class="local clearfix">
                <div class="local-title">
                    <a href="../../guide/index.html" target="mainFrame">Quick Reference</a>
                    <span class="toggle">(<a href="#" onclick="localToggle(); return false;">hide</a>)</span>
                </div>
                <div class="menu">
                    
                    <div class="menu-block">
                        <h1 class="menu-title" onclick="toggleRef(nextElement(this))">Command Line</h1>
                        <div class="menu-sub">
                            
                            <div class="menu-item"><a href="../../ref/Command%20Line/Usage.html">Usage</a></div>
                            
                            
                            <div class="menu-item"><a href="../../ref/Command%20Line/bug-report.html">bug-report</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Command%20Line/clean.html">clean</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Command%20Line/compile.html">compile</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Command%20Line/console.html">console</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Command%20Line/create-app.html">create-app</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Command%20Line/create-command.html">create-command</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Command%20Line/create-controller.html">create-controller</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Command%20Line/create-domain-class.html">create-domain-class</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Command%20Line/create-functional-test.html">create-functional-test</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Command%20Line/create-hibernate-cfg-xml.html">create-hibernate-cfg-xml</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Command%20Line/create-integration-test.html">create-integration-test</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Command%20Line/create-interceptor.html">create-interceptor</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Command%20Line/create-plugin.html">create-plugin</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Command%20Line/create-profile.html">create-profile</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Command%20Line/create-script.html">create-script</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Command%20Line/create-service.html">create-service</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Command%20Line/create-taglib.html">create-taglib</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Command%20Line/create-unit-test.html">create-unit-test</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Command%20Line/dependency-report.html">dependency-report</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Command%20Line/docs.html">docs</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Command%20Line/generate-all.html">generate-all</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Command%20Line/generate-controller.html">generate-controller</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Command%20Line/generate-views.html">generate-views</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Command%20Line/help.html">help</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Command%20Line/install-templates.html">install-templates</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Command%20Line/list-plugins.html">list-plugins</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Command%20Line/list-profiles.html">list-profiles</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Command%20Line/package-plugin.html">package-plugin</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Command%20Line/package.html">package</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Command%20Line/plugin-info.html">plugin-info</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Command%20Line/profile-info.html">profile-info</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Command%20Line/run-app.html">run-app</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Command%20Line/run-command.html">run-command</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Command%20Line/run-script.html">run-script</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Command%20Line/schema-export.html">schema-export</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Command%20Line/shell.html">shell</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Command%20Line/stats.html">stats</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Command%20Line/stop-app.html">stop-app</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Command%20Line/test-app.html">test-app</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Command%20Line/war.html">war</a>
                            </div>
                            
                        </div>
                    </div>
                    
                    <div class="menu-block">
                        <h1 class="menu-title" onclick="toggleRef(nextElement(this))">Constraints</h1>
                        <div class="menu-sub">
                            
                            <div class="menu-item"><a href="../../ref/Constraints/Usage.html">Usage</a></div>
                            
                            
                            <div class="menu-item"><a href="../../ref/Constraints/attributes.html">attributes</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Constraints/bindable.html">bindable</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Constraints/blank.html">blank</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Constraints/creditCard.html">creditCard</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Constraints/email.html">email</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Constraints/inList.html">inList</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Constraints/matches.html">matches</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Constraints/max.html">max</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Constraints/maxSize.html">maxSize</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Constraints/min.html">min</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Constraints/minSize.html">minSize</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Constraints/notEqual.html">notEqual</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Constraints/nullable.html">nullable</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Constraints/range.html">range</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Constraints/scale.html">scale</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Constraints/size.html">size</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Constraints/unique.html">unique</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Constraints/url.html">url</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Constraints/validator.html">validator</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Constraints/widget.html">widget</a>
                            </div>
                            
                        </div>
                    </div>
                    
                    <div class="menu-block">
                        <h1 class="menu-title" onclick="toggleRef(nextElement(this))">Controllers</h1>
                        <div class="menu-sub">
                            
                            <div class="menu-item"><a href="../../ref/Controllers/Usage.html">Usage</a></div>
                            
                            
                            <div class="menu-item"><a href="../../ref/Controllers/actionName.html">actionName</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Controllers/allowedMethods.html">allowedMethods</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Controllers/bindData.html">bindData</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Controllers/chain.html">chain</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Controllers/controllerName.html">controllerName</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Controllers/defaultAction.html">defaultAction</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Controllers/errors.html">errors</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Controllers/flash.html">flash</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Controllers/forward.html">forward</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Controllers/grailsApplication.html">grailsApplication</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Controllers/hasErrors.html">hasErrors</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Controllers/namespace.html">namespace</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Controllers/params.html">params</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Controllers/redirect.html">redirect</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Controllers/render.html">render</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Controllers/request.html">request</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Controllers/respond.html">respond</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Controllers/response.html">response</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Controllers/responseFormats.html">responseFormats</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Controllers/scope.html">scope</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Controllers/servletContext.html">servletContext</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Controllers/session.html">session</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Controllers/withForm.html">withForm</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Controllers/withFormat.html">withFormat</a>
                            </div>
                            
                        </div>
                    </div>
                    
                    <div class="menu-block">
                        <h1 class="menu-title" onclick="toggleRef(nextElement(this))">Database Mapping</h1>
                        <div class="menu-sub">
                            
                            <div class="menu-item"><a href="../../ref/Database%20Mapping/Usage.html">Usage</a></div>
                            
                            
                            <div class="menu-item"><a href="../../ref/Database%20Mapping/autoImport.html">autoImport</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Database%20Mapping/autoTimestamp.html">autoTimestamp</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Database%20Mapping/batchSize.html">batchSize</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Database%20Mapping/cache.html">cache</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Database%20Mapping/cascade.html">cascade</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Database%20Mapping/column.html">column</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Database%20Mapping/comment.html">comment</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Database%20Mapping/discriminator.html">discriminator</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Database%20Mapping/dynamicInsert.html">dynamicInsert</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Database%20Mapping/dynamicUpdate.html">dynamicUpdate</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Database%20Mapping/fetch.html">fetch</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Database%20Mapping/id.html">id</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Database%20Mapping/ignoreNotFound.html">ignoreNotFound</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Database%20Mapping/indexColumn.html">indexColumn</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Database%20Mapping/insertable.html">insertable</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Database%20Mapping/joinTable.html">joinTable</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Database%20Mapping/lazy.html">lazy</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Database%20Mapping/order.html">order</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Database%20Mapping/sort.html">sort</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Database%20Mapping/table.html">table</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Database%20Mapping/type.html">type</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Database%20Mapping/updateable.html">updateable</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Database%20Mapping/version.html">version</a>
                            </div>
                            
                        </div>
                    </div>
                    
                    <div class="menu-block">
                        <h1 class="menu-title" onclick="toggleRef(nextElement(this))">Domain Classes</h1>
                        <div class="menu-sub selected">
                            
                            <div class="menu-item"><a href="../../ref/Domain%20Classes/Usage.html">Usage</a></div>
                            
                            
                            <div class="menu-item"><a href="../../ref/Domain%20Classes/addTo.html">addTo</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Domain%20Classes/attach.html">attach</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Domain%20Classes/belongsTo.html">belongsTo</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Domain%20Classes/clearErrors.html">clearErrors</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Domain%20Classes/constraints.html">constraints</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Domain%20Classes/count.html">count</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Domain%20Classes/countBy.html">countBy</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Domain%20Classes/createCriteria.html">createCriteria</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Domain%20Classes/delete.html">delete</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Domain%20Classes/discard.html">discard</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Domain%20Classes/embedded.html">embedded</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Domain%20Classes/errors.html">errors</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Domain%20Classes/executeQuery.html">executeQuery</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Domain%20Classes/executeUpdate.html">executeUpdate</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Domain%20Classes/exists.html">exists</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Domain%20Classes/fetchMode.html">fetchMode</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Domain%20Classes/find.html">find</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Domain%20Classes/findAll.html">findAll</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Domain%20Classes/findAllBy.html">findAllBy</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Domain%20Classes/findAllWhere.html">findAllWhere</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Domain%20Classes/findBy.html">findBy</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Domain%20Classes/findOrCreateBy.html">findOrCreateBy</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Domain%20Classes/findOrCreateWhere.html">findOrCreateWhere</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Domain%20Classes/findOrSaveBy.html">findOrSaveBy</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Domain%20Classes/findOrSaveWhere.html">findOrSaveWhere</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Domain%20Classes/findWhere.html">findWhere</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Domain%20Classes/first.html">first</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Domain%20Classes/get.html">get</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Domain%20Classes/getAll.html">getAll</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Domain%20Classes/getDirtyPropertyNames.html">getDirtyPropertyNames</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Domain%20Classes/getPersistentValue.html">getPersistentValue</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Domain%20Classes/hasErrors.html">hasErrors</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Domain%20Classes/hasMany.html">hasMany</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Domain%20Classes/hasOne.html">hasOne</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Domain%20Classes/ident.html">ident</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Domain%20Classes/instanceOf.html">instanceOf</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Domain%20Classes/isAttached.html">isAttached</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Domain%20Classes/isDirty.html">isDirty</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Domain%20Classes/last.html">last</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Domain%20Classes/list.html">list</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Domain%20Classes/listOrderBy.html">listOrderBy</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Domain%20Classes/load.html">load</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Domain%20Classes/lock.html">lock</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Domain%20Classes/mapWith.html">mapWith</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Domain%20Classes/mappedBy.html">mappedBy</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Domain%20Classes/mapping.html">mapping</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Domain%20Classes/merge.html">merge</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Domain%20Classes/namedQueries.html">namedQueries</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Domain%20Classes/properties.html">properties</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Domain%20Classes/read.html">read</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Domain%20Classes/refresh.html">refresh</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Domain%20Classes/removeFrom.html">removeFrom</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Domain%20Classes/save.html">save</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Domain%20Classes/transients.html">transients</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Domain%20Classes/validate.html">validate</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Domain%20Classes/where.html">where</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Domain%20Classes/whereAny.html">whereAny</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Domain%20Classes/withCriteria.html">withCriteria</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Domain%20Classes/withNewSession.html">withNewSession</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Domain%20Classes/withSession.html">withSession</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Domain%20Classes/withTransaction.html">withTransaction</a>
                            </div>
                            
                        </div>
                    </div>
                    
                    <div class="menu-block">
                        <h1 class="menu-title" onclick="toggleRef(nextElement(this))">Plug-ins</h1>
                        <div class="menu-sub">
                            
                            <div class="menu-item"><a href="../../ref/Plug-ins/Usage.html">Usage</a></div>
                            
                            
                            <div class="menu-item"><a href="../../ref/Plug-ins/URL%20mappings.html">URL mappings</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Plug-ins/codecs.html">codecs</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Plug-ins/controllers.html">controllers</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Plug-ins/core.html">core</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Plug-ins/dataSource.html">dataSource</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Plug-ins/domainClasses.html">domainClasses</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Plug-ins/hibernate.html">hibernate</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Plug-ins/i18n.html">i18n</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Plug-ins/logging.html">logging</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Plug-ins/scaffolding.html">scaffolding</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Plug-ins/services.html">services</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Plug-ins/servlets.html">servlets</a>
                            </div>
                            
                        </div>
                    </div>
                    
                    <div class="menu-block">
                        <h1 class="menu-title" onclick="toggleRef(nextElement(this))">Services</h1>
                        <div class="menu-sub">
                            
                            <div class="menu-item"><a href="../../ref/Services/Usage.html">Usage</a></div>
                            
                            
                            <div class="menu-item"><a href="../../ref/Services/scope.html">scope</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Services/transactional.html">transactional</a>
                            </div>
                            
                        </div>
                    </div>
                    
                    <div class="menu-block">
                        <h1 class="menu-title" onclick="toggleRef(nextElement(this))">Servlet API</h1>
                        <div class="menu-sub">
                            
                            
                            <div class="menu-item"><a href="../../ref/Servlet%20API/request.html">request</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Servlet%20API/response.html">response</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Servlet%20API/servletContext.html">servletContext</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Servlet%20API/session.html">session</a>
                            </div>
                            
                        </div>
                    </div>
                    
                    <div class="menu-block">
                        <h1 class="menu-title" onclick="toggleRef(nextElement(this))">Tag Libraries</h1>
                        <div class="menu-sub">
                            
                            <div class="menu-item"><a href="../../ref/Tag%20Libraries/Usage.html">Usage</a></div>
                            
                            
                            <div class="menu-item"><a href="../../ref/Tag%20Libraries/actionName.html">actionName</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Tag%20Libraries/controllerName.html">controllerName</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Tag%20Libraries/flash.html">flash</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Tag%20Libraries/pageScope.html">pageScope</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Tag%20Libraries/params.html">params</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Tag%20Libraries/request.html">request</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Tag%20Libraries/response.html">response</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Tag%20Libraries/servletContext.html">servletContext</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Tag%20Libraries/session.html">session</a>
                            </div>
                            
                        </div>
                    </div>
                    
                    <div class="menu-block">
                        <h1 class="menu-title" onclick="toggleRef(nextElement(this))">Tags</h1>
                        <div class="menu-sub">
                            
                            
                            <div class="menu-item"><a href="../../ref/Tags/actionSubmit.html">actionSubmit</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Tags/actionSubmitImage.html">actionSubmitImage</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Tags/applyLayout.html">applyLayout</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Tags/checkBox.html">checkBox</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Tags/collect.html">collect</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Tags/cookie.html">cookie</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Tags/country.html">country</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Tags/countrySelect.html">countrySelect</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Tags/createLink.html">createLink</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Tags/createLinkTo.html">createLinkTo</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Tags/currencySelect.html">currencySelect</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Tags/datePicker.html">datePicker</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Tags/each.html">each</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Tags/eachError.html">eachError</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Tags/else.html">else</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Tags/elseif.html">elseif</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Tags/external.html">external</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Tags/field.html">field</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Tags/fieldError.html">fieldError</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Tags/fieldValue.html">fieldValue</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Tags/findAll.html">findAll</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Tags/form.html">form</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Tags/formatBoolean.html">formatBoolean</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Tags/formatDate.html">formatDate</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Tags/formatNumber.html">formatNumber</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Tags/grep.html">grep</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Tags/hasErrors.html">hasErrors</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Tags/header.html">header</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Tags/hiddenField.html">hiddenField</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Tags/if.html">if</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Tags/img.html">img</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Tags/include.html">include</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Tags/isAvailable.html">isAvailable</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Tags/isNotAvailable.html">isNotAvailable</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Tags/javascript.html">javascript</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Tags/join.html">join</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Tags/layoutBody.html">layoutBody</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Tags/layoutHead.html">layoutHead</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Tags/layoutTitle.html">layoutTitle</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Tags/link.html">link</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Tags/localeSelect.html">localeSelect</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Tags/message.html">message</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Tags/meta.html">meta</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Tags/pageProperty.html">pageProperty</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Tags/paginate.html">paginate</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Tags/passwordField.html">passwordField</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Tags/radio.html">radio</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Tags/radioGroup.html">radioGroup</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Tags/render.html">render</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Tags/renderErrors.html">renderErrors</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Tags/resource.html">resource</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Tags/select.html">select</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Tags/set.html">set</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Tags/sortableColumn.html">sortableColumn</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Tags/submitButton.html">submitButton</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Tags/textArea.html">textArea</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Tags/textField.html">textField</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Tags/timeZoneSelect.html">timeZoneSelect</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Tags/unless.html">unless</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Tags/uploadForm.html">uploadForm</a>
                            </div>
                            
                            <div class="menu-item"><a href="../../ref/Tags/while.html">while</a>
                            </div>
                            
                        </div>
                    </div>
                    
                </div>
            </div>
        </td>
    </tr>
</table>

<div id="footer">
    Copies of this document may be made for your own use and for distribution to others, provided that you do not charge any fee for such copies and further provided that each copy contains this Copyright Notice, whether distributed in print or electronically.
    
</div>


<script type="text/javascript" src="../../js/docs.js"></script>

</body>
</html>
